\(\int \frac {\log (\frac {\sqrt {1-a x}}{\sqrt {1+a x}})}{1-a^2 x^2} \, dx\) [50]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 34, antiderivative size = 30 \[ \int \frac {\log \left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{1-a^2 x^2} \, dx=-\frac {\log ^2\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{2 a} \]

[Out]

-1/2*ln((-a*x+1)^(1/2)/(a*x+1)^(1/2))^2/a

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2573, 2576, 12, 2338} \[ \int \frac {\log \left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{1-a^2 x^2} \, dx=-\frac {\log ^2\left (\frac {\sqrt {1-a x}}{\sqrt {a x+1}}\right )}{2 a} \]

[In]

Int[Log[Sqrt[1 - a*x]/Sqrt[1 + a*x]]/(1 - a^2*x^2),x]

[Out]

-1/2*Log[Sqrt[1 - a*x]/Sqrt[1 + a*x]]^2/a

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2573

Int[((A_.) + Log[(e_.)*(u_)^(n_.)*(v_)^(mn_)]*(B_.))^(p_.)*(w_.), x_Symbol] :> Subst[Int[w*(A + B*Log[e*(u/v)^
n])^p, x], e*(u/v)^n, e*(u^n/v^n)] /; FreeQ[{e, A, B, n, p}, x] && EqQ[n + mn, 0] && LinearQ[{u, v}, x] &&  !I
ntegerQ[n]

Rule 2576

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*(P2x_)^(m_.), x_Symbol]
 :> With[{f = Coeff[P2x, x, 0], g = Coeff[P2x, x, 1], h = Coeff[P2x, x, 2]}, Dist[b*c - a*d, Subst[Int[(b^2*f
- a*b*g + a^2*h - (2*b*d*f - b*c*g - a*d*g + 2*a*c*h)*x + (d^2*f - c*d*g + c^2*h)*x^2)^m*((A + B*Log[e*x^n])^p
/(b - d*x)^(2*(m + 1))), x], x, (a + b*x)/(c + d*x)], x]] /; FreeQ[{a, b, c, d, e, A, B, n}, x] && PolyQ[P2x,
x, 2] && NeQ[b*c - a*d, 0] && IntegerQ[m] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {\log \left (\sqrt {\frac {1-a x}{1+a x}}\right )}{1-a^2 x^2} \, dx,\sqrt {\frac {1-a x}{1+a x}},\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right ) \\ & = -\text {Subst}\left ((2 a) \text {Subst}\left (\int \frac {\log \left (\sqrt {x}\right )}{4 a^2 x} \, dx,x,\frac {1-a x}{1+a x}\right ),\sqrt {\frac {1-a x}{1+a x}},\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right ) \\ & = -\text {Subst}\left (\frac {\text {Subst}\left (\int \frac {\log \left (\sqrt {x}\right )}{x} \, dx,x,\frac {1-a x}{1+a x}\right )}{2 a},\sqrt {\frac {1-a x}{1+a x}},\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right ) \\ & = -\frac {\log ^2\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{2 a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00 \[ \int \frac {\log \left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{1-a^2 x^2} \, dx=-\frac {\log ^2\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{2 a} \]

[In]

Integrate[Log[Sqrt[1 - a*x]/Sqrt[1 + a*x]]/(1 - a^2*x^2),x]

[Out]

-1/2*Log[Sqrt[1 - a*x]/Sqrt[1 + a*x]]^2/a

Maple [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.49 (sec) , antiderivative size = 151, normalized size of antiderivative = 5.03

method result size
parts \(\frac {\ln \left (\frac {\sqrt {-a x +1}}{\sqrt {a x +1}}\right ) \ln \left (a x +1\right )}{2 a}-\frac {\ln \left (\frac {\sqrt {-a x +1}}{\sqrt {a x +1}}\right ) \ln \left (a x -1\right )}{2 a}+\frac {\ln \left (a x -1\right )^{2}}{8 a}-\frac {\operatorname {dilog}\left (\frac {a x}{2}+\frac {1}{2}\right )}{4 a}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{4 a}-\frac {\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{2}-\frac {\operatorname {dilog}\left (\frac {a x}{2}+\frac {1}{2}\right )}{2}-\frac {\ln \left (a x +1\right )^{2}}{4}}{2 a}\) \(151\)

[In]

int(ln((-a*x+1)^(1/2)/(a*x+1)^(1/2))/(-a^2*x^2+1),x,method=_RETURNVERBOSE)

[Out]

1/2*ln((-a*x+1)^(1/2)/(a*x+1)^(1/2))/a*ln(a*x+1)-1/2*ln((-a*x+1)^(1/2)/(a*x+1)^(1/2))/a*ln(a*x-1)+1/8/a*ln(a*x
-1)^2-1/4/a*dilog(1/2*a*x+1/2)-1/4/a*ln(a*x-1)*ln(1/2*a*x+1/2)-1/2/a*(1/2*(ln(a*x+1)-ln(1/2*a*x+1/2))*ln(-1/2*
a*x+1/2)-1/2*dilog(1/2*a*x+1/2)-1/4*ln(a*x+1)^2)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80 \[ \int \frac {\log \left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{1-a^2 x^2} \, dx=-\frac {\log \left (\frac {\sqrt {-a x + 1}}{\sqrt {a x + 1}}\right )^{2}}{2 \, a} \]

[In]

integrate(log((-a*x+1)^(1/2)/(a*x+1)^(1/2))/(-a^2*x^2+1),x, algorithm="fricas")

[Out]

-1/2*log(sqrt(-a*x + 1)/sqrt(a*x + 1))^2/a

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 65 vs. \(2 (24) = 48\).

Time = 2.15 (sec) , antiderivative size = 65, normalized size of antiderivative = 2.17 \[ \int \frac {\log \left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{1-a^2 x^2} \, dx=- \frac {\operatorname {atan}^{2}{\left (\frac {x}{\sqrt {- \frac {1}{a^{2}}}} \right )}}{2 a} - \frac {\log {\left (\frac {\sqrt {- a x + 1}}{\sqrt {a x + 1}} \right )} \operatorname {atan}{\left (\frac {x}{\sqrt {- \frac {1}{a^{2}}}} \right )}}{a^{2} \sqrt {- \frac {1}{a^{2}}}} \]

[In]

integrate(ln((-a*x+1)**(1/2)/(a*x+1)**(1/2))/(-a**2*x**2+1),x)

[Out]

-atan(x/sqrt(-1/a**2))**2/(2*a) - log(sqrt(-a*x + 1)/sqrt(a*x + 1))*atan(x/sqrt(-1/a**2))/(a**2*sqrt(-1/a**2))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (24) = 48\).

Time = 0.30 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.77 \[ \int \frac {\log \left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{1-a^2 x^2} \, dx=\frac {1}{2} \, {\left (\frac {\log \left (a x + 1\right )}{a} - \frac {\log \left (a x - 1\right )}{a}\right )} \log \left (\frac {\sqrt {-a x + 1}}{\sqrt {a x + 1}}\right ) + \frac {\log \left (a x - 1\right )^{2}}{8 \, a} + \frac {\log \left (a x + 1\right )^{2} - 2 \, \log \left (a x + 1\right ) \log \left (a x - 1\right )}{8 \, a} \]

[In]

integrate(log((-a*x+1)^(1/2)/(a*x+1)^(1/2))/(-a^2*x^2+1),x, algorithm="maxima")

[Out]

1/2*(log(a*x + 1)/a - log(a*x - 1)/a)*log(sqrt(-a*x + 1)/sqrt(a*x + 1)) + 1/8*log(a*x - 1)^2/a + 1/8*(log(a*x
+ 1)^2 - 2*log(a*x + 1)*log(a*x - 1))/a

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (24) = 48\).

Time = 0.31 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.93 \[ \int \frac {\log \left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{1-a^2 x^2} \, dx=\frac {1}{4} \, {\left (\frac {\log \left (a x + 1\right )}{a} - \frac {\log \left (a x - 1\right )}{a}\right )} \log \left (-a x + 1\right ) - \frac {\log \left (a x + 1\right )^{2}}{8 \, a} + \frac {\log \left (a x - 1\right )^{2}}{8 \, a} \]

[In]

integrate(log((-a*x+1)^(1/2)/(a*x+1)^(1/2))/(-a^2*x^2+1),x, algorithm="giac")

[Out]

1/4*(log(a*x + 1)/a - log(a*x - 1)/a)*log(-a*x + 1) - 1/8*log(a*x + 1)^2/a + 1/8*log(a*x - 1)^2/a

Mupad [F(-1)]

Timed out. \[ \int \frac {\log \left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )}{1-a^2 x^2} \, dx=-\int \frac {\ln \left (\frac {\sqrt {1-a\,x}}{\sqrt {a\,x+1}}\right )}{a^2\,x^2-1} \,d x \]

[In]

int(-log((1 - a*x)^(1/2)/(a*x + 1)^(1/2))/(a^2*x^2 - 1),x)

[Out]

-int(log((1 - a*x)^(1/2)/(a*x + 1)^(1/2))/(a^2*x^2 - 1), x)